<p>El siguiente listado muestra las zonas elija una para editarla.</p>

<?php if (count($this->paginator)): ?>
<table class="listclass" width="100%" border="0" cellpadding="0" cellspacing="0">
    <thead>
      <tr>
            <th width="10%" align="left">ID</th>
            <th width="10%" align="left">Padre</th>
            <th width="10%" align="left">Nombre</th>
            <th width="10%" align="left">Estado</th>
            <th width="15%" align="left">Fecha de baja</th>
            <th colspan= 2 width="20%" align="left">Accion</th>
      </tr>
    </thead>

    <tbody>
        <?php $i=0; foreach ($this->paginator as $zone) : ?>
              <tr class=<?php echo ($i%2==0?'"even clickable"':'"odd clickable"') ?>
                onclick="document.location='/zonecost/update/id/<?php echo $zone['zone_id'] ?>/'"
              >
                    <td valign="top"><?php echo $zone['zone_id']; ?></td>
                    <td valign="top"><?php echo ( isset( $zone['zone_parent_name'])  )?$zone['zone_parent_name']:'' ?></td>
                    <td valign="top"><?php echo $zone['name'] ?></td>
                    <td valign="top"><?php echo $zone['locked']=="T"?"Bloqueado":"Activo" ?></td>
					<td valign="top"><?php echo is_null($zone['end_date'])?"":$zone['end_date'] ?></td>
					<td valign="top">
                        <?php if (is_null($zone['end_date'])) : ?>
                            <?php echo $this->href( "zonecost", "delete", "Dar de Baja", array( "parentId" => $zone['parent_zone_id'],"id" => $zone['zone_id'], 'zone' => $this->zone ) ) ?>
                        <?php else : ?>
                            <?php echo $this->href( "zonecost", "delete", "Reactivar", array( "parentId" => $zone['parent_zone_id'],"id" => $zone['zone_id'], 'zone' => $this->zone ) ) ?>
                        <?php endif; ?>
                        <?php echo $this->href( "zonecost", $this->childName."list", "Editar ".$this->childName, array( "parentId" => $zone['zone_id'], 'zone' => $this->zone ) ) ?>
                    </td>	
              </tr>
        <?php $i++; endforeach; ;?>
    </tbody>
</table>
<?php echo $this->paginator ?>
<?php endif; ?>
<p>
<?php echo $this->href( "zonecost", "create", "Crear una nueva zona" );?>
</p>
